<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:zhjin="http://java.sun.com/jsf/composite/component"
	xmlns:zh="http://www.zhjin.com/custom"
	template="../../template/base.xhtml"> 

	<ui:define name="title">
		#{windowData.inData.name} : 员工信息
	</ui:define>
	<ui:define name="pagecontent">
		<p:layout fullPage="true">	
		    <p:layoutUnit position="north" size="200" header="员工信息" gutter="1" effect="drop" resizable="false">
		        <div style="position:absolute;left:0px;top:1px;right:150px;bottom:0px;overflow:hidden;border: 0px solid #a6c9e2;">
		        	<p:graphicImage id="employeePhoto"
		        		url="/sys/showImage?imageId=#{windowData.objMap['photo']}" height="170" width="125" style="padding:0px;margin:0px;" 
		        		ondblclick="$(':file', photoupload).click();">
		        	</p:graphicImage>
		        </div>
		        <div style="position:absolute;left:200px;top:20px;right:0px;bottom:0px;overflow:none;border: 0px solid #a6c9e2;">
				    <zhjin:objectEdit value="#{windowData.objMap['viewData']}">
				    </zhjin:objectEdit>    					
	    	    </div>
	        	<div id="photoupload" style="visibility:hidden;display:inline;">
	        		<h:form enctype="multipart/form-data">
			    		<p:fileUpload auto="true" sizeLimit="200000" update=":employeePhoto"
			    			allowTypes="/(\.|\/)(gif|jpeg|jpg|png)$/"
			    			fileUploadListener="#{employeeManager.uploadEmployeePhoto}" showButtons="false">
				    	</p:fileUpload>
				    </h:form>
	    	    </div>
	    	</p:layoutUnit>
		    <p:layoutUnit id="centerunit" position="center" resizable="false">   	
			   	<zh:div id="aaa" style="position:absolute;left:0px;top:0px;right:0px;bottom:2px;overflow:none;border:0px solid #a6c9e2;">
			    	<p:tabView id="infoTab" scrollable="true">
						<p:tab title="基本信息">	
							<h:form enctype="multipart/form-data">			
							<zh:div>
				    			<p:fieldset legend="基本信息">
				    				<zhjin:objectEdit value="#{windowData.defaultObjectEditData}">
				    				</zhjin:objectEdit>   
								</p:fieldset>
								<br/>
								<p:commandButton value="#{windowData.defaultObjectEditData.processCommandValue}"
									actionListener="#{objectEditManager.okProcess}"
									>
								</p:commandButton>
							</zh:div>
							</h:form>							
						</p:tab>
						<c:forEach var="item" items="#{windowData.objMap['personList']}">
							<p:tab title="#{item.objectNameCN}">
								<h:form id="#{item.objectName}" enctype="multipart/form-data">
									<zhjin:dataTable value="#{windowData.objMap[item.objectName]}"></zhjin:dataTable>
								</h:form>
							</p:tab>
						</c:forEach>
			    	</p:tabView>
	    		</zh:div>
	    	</p:layoutUnit>
		</p:layout>          
	</ui:define>
</ui:composition>